//
//  MainVM.h
//  KeTianDemo
//
//  Created by jay on 2020/8/24.
//  Copyright © 2020 jay. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ImageListModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface MainVM : NSObject

@property(nonatomic,strong) NSMutableArray *dataArr; //数据源
@property (nonatomic, assign) NSInteger pagenum; //分页-页码
@property (nonatomic, assign) NSInteger pagesize; //分页-每页个数
@property (nonatomic, assign) BOOL hasNext; //分页-是否有下一页

@property (nonatomic, copy) NSString *keywords; //搜索关键词

//请求数据
- (void)getDataFromNet:(BOOL )isReqMore completeHandle:(void(^)(NSError *error))completionHandle;

//数据源个数
- (NSInteger)rowNumber;
//模型
- (ImageListModel *)modelForRow:(NSInteger )row;

@end

NS_ASSUME_NONNULL_END
